#基础镜像,通过jdk8镜像开始
FROM openjdk:8

# 将阿里云的源列表替换默认的源列表
RUN echo "" > /etc/apt/sources.list && \
    echo "deb http://mirrors.aliyun.com/debian buster main" >> /etc/apt/sources.list && \
    echo "deb http://mirrors.aliyun.com/debian-security buster/updates main" >> /etc/apt/sources.list && \
    echo "deb http://mirrors.aliyun.com/debian buster-updates main" >> /etc/apt/sources.list

# 更新APT软件包列表，然后安装需要的软件包。
RUN apt-get update && apt-get install -y \
    nginx \
    net-tools